package top.tangyh.lamp.care.mapper;

import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import top.tangyh.basic.base.mapper.SuperMapper;
import top.tangyh.lamp.care.entity.BPgSrxDetailNormal;
import org.springframework.stereotype.Repository;
import top.tangyh.lamp.care.vo.result.ApacheiiPickPgDetailVO;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * Mapper 接口
 * 评估评分明细内容
 * </p>
 *
 * @author zqb
 * @date 2024-07-10 08:51:41
 * @create [2024-07-10 08:51:41] [zqb] [代码生成器生成]
 */
@Repository
public interface BPgSrxDetailNormalMapper extends SuperMapper<BPgSrxDetailNormal> {

    default List<BPgSrxDetailNormal> selectListBySrxId(Long id){
        LambdaQueryWrapper<BPgSrxDetailNormal> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(BPgSrxDetailNormal::getPgSrxId,id);
        return this.selectList(wrapper);
    }

    default List<BPgSrxDetailNormal> selectListBySrxIdList(List<Long> srxIdList) {
        if(CollectionUtil.isEmpty(srxIdList)){
            return  new ArrayList<>();
        }
        LambdaQueryWrapper<BPgSrxDetailNormal> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(BPgSrxDetailNormal::getPgSrxId, srxIdList);
        return this.selectList(queryWrapper);
    }

    default List<BPgSrxDetailNormal> selectListBySrxIds(Set<Long> srxids){
        LambdaQueryWrapper<BPgSrxDetailNormal> wrapper = new LambdaQueryWrapper<>();
        wrapper.in(BPgSrxDetailNormal::getPgSrxId,srxids);
        return this.selectList(wrapper);
    }

    List<ApacheiiPickPgDetailVO> findPgDetail(String pgRecordId);
}


